In any of the binary math modes, the number type (signed or unsigned) can be changed using the [SIGN] button, and the word size (byte - 8 bits, word - 16 bits, or long - 32 bits) can be changed using the [SIZE] button. The size changes from B->W->L as you press the [SIZE] button, or from L->W->B if you press the [SIZE] button while the [2nd] button is depressed. The current sign and word size is shown in the display as 窶牢BYTE窶, 窶篭BYTE窶, 窶牢WORD窶, 窶篭WORD窶, 窶牢LONG窶, or 窶篭LONG窶. You can also select the size and sign by using the popup menus that appear if you hold the button down until the menu appears. If the Pad binary numbers option is selected in the Number Format dialog, all numbers displayed in these modes will be padded with leading zeros to the currently selected word size.
A displayed number may be truncated or sign-extended when switching word sign or size, depending on the size of the number. If it is truncated, an error message will appear in the display, but you can still continue with the calculation if you wish.
Binary math functions are available in [Bin], [Oct], [Dec], and [Hex] modes only and are as follows...
[AND] Bit wise AND
[OR ] Bit wise OR
[XOR] Bit wise exclusive OR
[MOD] Modulus (division remainder)
[NOT] One's complement
[NEG] Negate (two's complement)
[ASL] Arithmetic shift left
[ASR] Arithmetic shift right
[LSL] Logical shift left
[LSR] Logical shift right
[ROL] Rotate left
[ROR] Rotate right
[ASLx] Arithmetic shift left 窶x窶 bits
[ASRx] Arithmetic shift right 窶x窶 bits
[LSLx] Logical shift left 窶x窶 bits
[LSRx] Logical shift right 窶x窶 bits
[ROLx] Rotate left 窶x窶 bits
[RORx] Rotate right 窶x窶 bits
The last six operations (shift and rotate 窶x窶 operations) use locking buttons, similar to the extended memory functions. Press the button and the button locks, then press a number button 0-9 or A-F, and the operation is completed. Shifts or rotates of 1 to 16 bits are possible with these operations (pressing the 0 button shifts 16 bits). The number of bit positions is also selectable from the popup menu for each button.
All operations in this mode (except as noted) execute the corresponding 680x0 instruction directly and then check the CPU condition codes and display the codes in the display. For multiplication, division, and modulus operations, the operation is carried out using floating point arithmetic, then the result is moved into a data register, and the condition codes are checked and displayed. The condition codes displayed are...
C Carry
V oVerflow (result overflow)
Z Zero (result is zero)
N Negative (high-order bit is set)
An upper case character indicates the condition is true (bit set), while lower case indicates false (bit cleared).